<template>
	<view>
		<button @click="toPage('1')">周报</button>
		<button @click="toPage('2')">月报</button>
	</view>
</template>
<script>
	import {loginUser} from "../../static/main.js"
	export default {
		data() {
			return {

			}
		},
		onLoad(e) {
			console.log(e)
			var userName = e.userName
			var startTime = e.startTime
			var endTime  = e.endTime 
			var date = e.date
			var page = e.page
			localStorage.setItem('userName',userName)
			localStorage.setItem('startTime',startTime)
			localStorage.setItem('endTime',endTime )
			localStorage.setItem('date',date)
			loginUser(e);
			this.toPage(page)
		},
		methods: {
			toPage(page) {
				if (page == "1") {
					uni.navigateTo({
						url: '/pages/index/weekReport'
					})
				} else {
					uni.navigateTo({
						url: '/pages/index/mouthReport'
					})
				}
			}
		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>